﻿using Framework.EncryptionDecryptionService.Attributes;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace Bright.NetCore.Api.Controllers
{
    [Route("api/TestValues/[action]")]
    [ApiController]
    [NonEncrypted]
    public class TestValuesController : ControllerBase
    {
        /// <summary>
        /// 不加密
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        [HttpPost]
        public object TestApi(object data)
        {
            return data;
        }

        /// <summary>
        /// 单独加密
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        [NonEncrypted(EncryptionType.Full)]
        public object TestApiFull(object data)
        {
            return data;
        }
    }
}
